﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ListManage.ascx.cs" Inherits="Manage_ListManage" %>
<%@ Register assembly="GuoShuCan.SDK.Web" namespace="GuoShuCan.SDK.Web.Controls" tagprefix="GSC" %>
<center>
<div style="height: 26px; vertical-align: middle; font-size: 12px;">
<asp:UpdatePanel ID="up0" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Mode %>"></asp:Label>
        <asp:DropDownList ID="SearchMode" runat="server" >
            <asp:ListItem Selected="True" Value="0">搜索名称</asp:ListItem>
            <asp:ListItem Value="1">搜索描述</asp:ListItem>
        </asp:DropDownList>
        <asp:Label ID="Label3" runat="server" Text="<%$ Resources:Key %>"></asp:Label>
        <asp:TextBox ID="Key" runat="server" ToolTip="<%$ Resources:Key_ToolTip %>" Width="158px"></asp:TextBox>
        <asp:Button ID="Search" runat="server" Text="<%$ Resources:Button %>" ToolTip="" onclick="Search_Click" />
        <asp:Button ID="Reset" runat="server" Text="<%$ Resources:ResetButton %>" ToolTip="" onclick="Reset_Click" CausesValidation="False" />
        <asp:Button ID="Add" runat="server" Text="<%$ Resources:AddButton %>" ToolTip="" onclick="Add_Click" CausesValidation="False" />
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="Search" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="Reset" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="Add" EventName="Click" />
    </Triggers>
</asp:UpdatePanel>
</div>
<asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:AccessDataSource ID="ADS" runat="server" DataFile="~/App_Data/data.mdb" 
            SelectCommand="SELECT * FROM CNList" 
            DeleteCommand="DELETE FROM CNList WHERE (ID = ?)">
            <DeleteParameters>
                <asp:Parameter Name="?" />
            </DeleteParameters>
        </asp:AccessDataSource>
        <asp:GridView ID="ProductList" runat="server" 
    AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="ADS" 
            AllowPaging="True" 
            onrowcommand="ProductList_RowCommand" CssClass="table" onpageindexchanging="ProductList_PageIndexChanging" 
            onprerender="ProductList_PreRender" 
            onrowdatabound="ProductList_RowDataBound">
            <PagerSettings Mode="NumericFirstLast" FirstPageText="<%$ Resources:FirstPageText %>" LastPageText="<%$ Resources:LastPageText %>" 
                NextPageText="<%$ Resources:NextPageText %>" PreviousPageText="<%$ Resources:PreviousPageText %>" />
            <Columns>
                <asp:TemplateField HeaderText="ID" InsertVisible="False" SortExpression="ID">
                    <HeaderTemplate>
                        <asp:ImageButton ID="ORDER" runat="server" CausesValidation="False" CommandName="ORDER" ImageUrl="~/App_Themes/Manage_Default/images/Table/down.gif" ToolTip="<%$ Resources:IDOrder %>"/>&nbsp;<asp:Label ID="Label1" runat="server" Text="<%$ Resources:BaseInformation %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table style="width: 100%;" border="0" cellpadding="0" cellspacing="0" rules="none">
                            <tr>
                                <td align="right" valign="middle" width="128px" style="padding: 1px; border-bottom-style: dotted; border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-right-style: dotted; border-right-width: 1px; border-right-color: #CCCCCC;">
                                    <asp:Label ID="Label8" runat="server" Text="<%$ Resources:ProductNameLabel %>"></asp:Label>
                                </td>
                                <td style="padding: 1px; border-bottom-style: dotted; border-bottom-width: 1px; border-bottom-color: #CCCCCC;" align="left" valign="middle" width="auto" colspan="1" height="18px"><div style="word-break : break-all; overflow: hidden;" align="left">
                                    <div style="word-break : break-all; overflow: hidden;">
                                        <asp:Label ID="Name" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="middle" width="128px" 
                                    style="padding: 1px; border-bottom-style: dotted; border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-right-style: dotted; border-right-width: 1px; border-right-color: #CCCCCC;">
                                    <asp:Label ID="Label12" runat="server" Text="<%$ Resources:CreateTimeLabel %>"></asp:Label>
                                </td>
                                <td style="padding: 1px; border-bottom-style: dotted; border-bottom-width: 1px; border-bottom-color: #CCCCCC;" align="left" valign="middle" width="auto" colspan="1" height="18px">
                                    <asp:Label ID="Description" runat="server" ForeColor="Red" 
                                        Text='<%# Bind("CreateTime") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="middle" width="128px" 
                                    style="padding: 1px; border-bottom-style: dotted; border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-right-style: dotted; border-right-width: 1px; border-right-color: #CCCCCC;">
                                    <asp:Label ID="Label2" runat="server" Text="<%$ Resources:DescriptionLabel %>"></asp:Label>
                                </td>
                                <td style="padding: 1px; border-bottom-style: dotted; border-bottom-width: 1px; border-bottom-color: #CCCCCC;" align="left" valign="middle" width="auto" colspan="1" height="18px">
                                    <asp:Label ID="Label4" runat="server" ForeColor="Red" 
                                        Text='<%# Bind("Description") %>'></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="middle" width="128px" style="padding: 1px; border-bottom-style: dotted; border-bottom-width: 1px; border-bottom-color: #CCCCCC; border-right-style: dotted; border-right-width: 1px; border-right-color: #CCCCCC;">
                                    <asp:Label ID="Label6" runat="server" Text="<%$ Resources:ProductEditingLabel %>"></asp:Label>
                                </td>
                                <td style="padding: 1px; border-bottom-style: dotted; border-bottom-width: 1px; border-bottom-color: #CCCCCC;" align="left" valign="middle" width="auto" height="18px">[
                                <asp:LinkButton ID="EditParameters" runat="server" CssClass="table_tbody_tr_td_a" CausesValidation="False" Text="<%$ Resources:EditParameters %>" CommandName="EditParameters" CommandArgument='<%# Eval("ID") %>' ToolTip='<%# Bind("Name") %>'></asp:LinkButton>
                                <asp:LinkButton ID="EditPhotos" runat="server" CssClass="table_tbody_tr_td_a" CausesValidation="False" Text="<%$ Resources:EditPhotos %>" CommandName="EditPhoto" CommandArgument='<%# Eval("ID") %>'></asp:LinkButton>
                                <asp:LinkButton ID="EditDescription" runat="server" CssClass="table_tbody_tr_td_a" 
                                        CommandName="EditDescription" CommandArgument='<%# Eval("ID") %>' 
                                        ToolTip="<%$ Resources:EditDescription_ToolTip %>" 
                                        Text="<%$ Resources:EditDescription %>"></asp:LinkButton>]
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="615px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:ProductPhoto %>" SortExpression="LocalPhoto">
                    <EditItemTemplate>
                    </EditItemTemplate>
                    <ItemTemplate>
                    <GSC:ThumbnailImageButton runat="server" ID="Photo" CommandName="EditPhoto" CommandArgument='<%# Eval("ID") %>' Height="100px" ImageUrl='<%# "Upload\\"+Eval("Photo") %>' Width="128px" ToolTip="<%$ Resources:ProductPhoto_ToolTip %>"></GSC:ThumbnailImageButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="128px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:ProductDelete %>" ShowHeader="False">
                    <ItemTemplate>
                        <asp:ImageButton ID="Delete" runat="server" ImageUrl="~/App_Themes/Manage_Default/images/tool/delete.gif" Width="16px" ToolTip='<%# Bind("Name") %>' CommandName="Delete" CommandArgument='<%# Eval("ID") + "|" + Eval("Photo") %>' CausesValidation="False" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                </asp:TemplateField>
            </Columns>
            <PagerStyle VerticalAlign="Middle" HorizontalAlign="Center" />
            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            <AlternatingRowStyle BackColor="#FFFFCC" />
        </asp:GridView>
    </ContentTemplate>
</asp:UpdatePanel>
</center>